import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '@/views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    // children : [
    //   {
    //     path: '/',
    //     name: 'home',
    //     component: HomeView
    //   }
    // ]
  },
  {
    path: '/past',
    name: 'past',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "past" */ '@/views/PastView.vue')
  },
  {
    path: '/plan',
    name: 'plan',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "plan" */ '@/views/PlanView.vue'),
    children:[
      {
        path : 'planinfo',
        name : 'planinfo',
        component : ()=> import(/* webpackChunkName : "planinfo" */ '@/components/planComp/PlanMsg/SomeInfoFromFather.vue')
      },
      {
        path : 'nothing',
        name : 'nothing',
        component : ()=> import(/* webpackChunkName : "nothing" */ '@/components/planComp/PlanMsg/Nothing.vue')
      }
    ]
  },
  {
    path: '/future',
    name: 'future',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "future" */ '@/views/FutureView.vue')
  },
  {
    path: '/more',
    name: 'more',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "more" */ '@/views/MoreView.vue')
  },
  {
    path: '/moreimg',
    name: 'moreimg',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "moreimg" */ '@/components/pastComp/MoreImg/MoreImg01.vue'),
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
